package ${escapeKotlinIdentifiers(packageName)}.fragment

import android.view.View
import com.mettingocean.millionsboss.base.AnkoFragment
import czh.fast.lib.utils.anko.setContentView
import ${escapeKotlinIdentifiers(packageName)}.layout.${activityClass}FragmentUI
<#if generateMVP>
import ${escapeKotlinIdentifiers(packageName)}.contract.${activityClass}Contract
import ${escapeKotlinIdentifiers(packageName)}.presenter.${activityClass}Presenter
</#if>

class ${activityClass}Fragment : AnkoFragment()<#if generateMVP>,${activityClass}Contract.View</#if> {
    val ui = ${activityClass}FragmentUI()
	<#if generateMVP>
	var mPresenter = ${activityClass}Presenter(this)</#if>
    override fun ankoLayout(): View {
       return ui.setContentView(this)
    }

    override fun afterInitView() {

    }
	<#if generateMVP>
    override fun onDestroy() {
        super.onDestroy()
        mPresenter.cancel()
    }
	</#if>
}